﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DevExpress.XtraEditors.DXErrorProvider;

namespace CustomControlz.Validations
{
    public partial class ccDxValidationProvider : DXValidationProvider
    {
        public ccDxValidationProvider()
        {
            InitializeComponent();
        }


    }

    public class IsNullOrEmpty : ValidationRule
    {
        public override bool Validate(Control control, object value)
        {
            bool res = false;
            if (value == null)
                return false;
            else
            {
                var str = value.ToString();
                if (str.Trim() == "")
                    return false;
            }
            return true;
        }
    }
}
